<template>
  <div id="app" :class="{ 'is-component': isComponent }">
    <main-header v-if="lang !== 'play'"></main-header>
    <div class="main-cnt">
      <router-view></router-view>
    </div>
    <main-footer v-if="lang !== 'play' && !isComponent"></main-footer>
  </div>
</template>

<script>
import footer from './components/footer.vue'
import header from './components/header.vue'
export default {
  components: {
    mainFooter: footer,
    mainHeader: header
  },
  computed: {
    isComponent() {
      return /^common-|custom-/.test(this.$route.name || '')
    },
    lang() {
      return this.$route.path.split('/')[1] || 'zh-CN'
    }
  }
}
</script>

<style lang="scss">
.main-cnt {
  margin-top: 80px;
}
</style>
